function Bullet(x, y, src, size_w, size_h, speed, hurt) {
  Plane.call(this, x, y, src, size_w, size_h, speed)
  this.hurt = hurt;
  this.timer = null;
  this.init();
  this.towardUp();
  this.plane = null;
}

Bullet.prototype = new Plane();
Bullet.prototype.constructor = Bullet;

Bullet.prototype.towardUp = function () {
  this.timer = setInterval(() => {
    if (this.y < 0) {
      this.disappear();
    } else {
      this.y -= this.speed;
      this.move();
    }
  }, 1000 / 60);
}

Bullet.prototype.disappear = function() {
  this.destory();
  this.plane.bulletArray.remove(this);
  clearInterval(this.timer);
}
